3.158 \(\int (a+b \log (c x^n)) (d+e \log (f x^r)) \, dx\)

Optimal. Leaf size=77 \[ -e r x (a-b n)+a x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-b e r x \log \left (c x^n\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b e n r x \]

[Out]

b*e*n*r*x-e*(-b*n+a)*r*x-b*e*r*x*ln(c*x^n)+a*x*(d+e*ln(f*x^r))-b*n*x*(d+e*ln(f*x^r))+b*x*ln(c*x^n)*(d+e*ln(f*x
^r))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2295, 2361} \[ -e r x (a-b n)+a x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-b e r x \log \left (c x^n\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b e n r x \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

b*e*n*r*x - e*(a - b*n)*r*x - b*e*r*x*Log[c*x^n] + a*x*(d + e*Log[f*x^r]) - b*n*x*(d + e*Log[f*x^r]) + b*x*Log
[c*x^n]*(d + e*Log[f*x^r])

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.)), x_Symbol] :> With[{u =
IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[SimplifyIntegrand[u/x, x], x],
 x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right ) \, dx &=a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-(e r) \int \left (a-b n+b \log \left (c x^n\right )\right ) \, dx\\ &=-e (a-b n) r x+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )-(b e r) \int \log \left (c x^n\right ) \, dx\\ &=b e n r x-e (a-b n) r x-b e r x \log \left (c x^n\right )+a x \left (d+e \log \left (f x^r\right )\right )-b n x \left (d+e \log \left (f x^r\right )\right )+b x \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 58, normalized size = 0.75 \[ x \left (e (a-b n) \log \left (f x^r\right )+a d-a e r+b \log \left (c x^n\right ) \left (d+e \log \left (f x^r\right )-e r\right )-b d n+2 b e n r\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])*(d + e*Log[f*x^r]),x]

[Out]

x*(a*d - b*d*n - a*e*r + 2*b*e*n*r + e*(a - b*n)*Log[f*x^r] + b*Log[c*x^n]*(d - e*r + e*Log[f*x^r]))

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 110, normalized size = 1.43 \[ b e n r x \log \relax (x)^{2} - {\left (b e r - b d\right )} x \log \relax (c) - {\left (b d n - a d - {\left (2 \, b e n - a e\right )} r\right )} x + {\left (b e x \log \relax (c) - {\left (b e n - a e\right )} x\right )} \log \relax (f) + {\left (b e r x \log \relax (c) + b e n x \log \relax (f) + {\left (b d n - {\left (2 \, b e n - a e\right )} r\right )} x\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="fricas")

[Out]

b*e*n*r*x*log(x)^2 - (b*e*r - b*d)*x*log(c) - (b*d*n - a*d - (2*b*e*n - a*e)*r)*x + (b*e*x*log(c) - (b*e*n - a
*e)*x)*log(f) + (b*e*r*x*log(c) + b*e*n*x*log(f) + (b*d*n - (2*b*e*n - a*e)*r)*x)*log(x)

________________________________________________________________________________________

giac [A]  time = 0.27, size = 122, normalized size = 1.58 \[ b n r x e \log \relax (x)^{2} - 2 \, b n r x e \log \relax (x) + b r x e \log \relax (c) \log \relax (x) + b n x e \log \relax (f) \log \relax (x) + 2 \, b n r x e - b r x e \log \relax (c) - b n x e \log \relax (f) + b x e \log \relax (c) \log \relax (f) + b d n x \log \relax (x) + a r x e \log \relax (x) - b d n x - a r x e + b d x \log \relax (c) + a x e \log \relax (f) + a d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="giac")

[Out]

b*n*r*x*e*log(x)^2 - 2*b*n*r*x*e*log(x) + b*r*x*e*log(c)*log(x) + b*n*x*e*log(f)*log(x) + 2*b*n*r*x*e - b*r*x*
e*log(c) - b*n*x*e*log(f) + b*x*e*log(c)*log(f) + b*d*n*x*log(x) + a*r*x*e*log(x) - b*d*n*x - a*r*x*e + b*d*x*
log(c) + a*x*e*log(f) + a*d*x

________________________________________________________________________________________

maple [C]  time = 0.45, size = 1503, normalized size = 19.52 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*x^n)+a)*(d+e*ln(f*x^r)),x)

[Out]

(x*b*e*ln(x^n)+1/2*I*Pi*b*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*Pi*b*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1
/2*I*Pi*b*e*x*csgn(I*c*x^n)^3+1/2*I*Pi*b*e*x*csgn(I*c*x^n)^2*csgn(I*c)+b*e*x*ln(c)-b*e*n*x+a*e*x)*ln(x^r)+a*d*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1/2*I*Pi*b*e*x*csgn(I*x^r)*csgn(I*f*x^r)^2*ln(x^n)+1/2*I*Pi*ln(f)*b*e*x*csgn(I*c*x^n)^2*csgn(I*c)+1/2*I*Pi*ln
(f)*b*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2+1/4*Pi^2*b*e*x*csgn(I*c*x^n)^3*csgn(I*f)*csgn(I*f*x^r)^2+1/4*Pi^2*b*e*x*
csgn(I*c*x^n)^3*csgn(I*x^r)*csgn(I*f*x^r)^2+1/4*Pi^2*b*e*x*csgn(I*c*x^n)^2*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)
*csgn(I*c)-b*d*n*x-1/2*I*ln(c)*Pi*b*e*x*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)

________________________________________________________________________________________

maxima [A]  time = 0.64, size = 82, normalized size = 1.06 \[ {\left ({\left (2 \, r - \log \relax (f)\right )} x - x \log \left (x^{r}\right )\right )} b e n - b d n x - a e r x - {\left (r x - x \log \left (f x^{r}\right )\right )} b e \log \left (c x^{n}\right ) + b d x \log \left (c x^{n}\right ) + a e x \log \left (f x^{r}\right ) + a d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*(d+e*log(f*x^r)),x, algorithm="maxima")

[Out]

((2*r - log(f))*x - x*log(x^r))*b*e*n - b*d*n*x - a*e*r*x - (r*x - x*log(f*x^r))*b*e*log(c*x^n) + b*d*x*log(c*
x^n) + a*e*x*log(f*x^r) + a*d*x

________________________________________________________________________________________

mupad [B]  time = 3.78, size = 66, normalized size = 0.86 \[ x\,\left (a\,d-b\,d\,n-a\,e\,r+2\,b\,e\,n\,r\right )+\ln \left (f\,x^r\right )\,\left (a\,e\,x-b\,e\,n\,x+b\,e\,x\,\ln \left (c\,x^n\right )\right )+b\,x\,\ln \left (c\,x^n\right )\,\left (d-e\,r\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*log(f*x^r))*(a + b*log(c*x^n)),x)

[Out]

x*(a*d - b*d*n - a*e*r + 2*b*e*n*r) + log(f*x^r)*(a*e*x - b*e*n*x + b*e*x*log(c*x^n)) + b*x*log(c*x^n)*(d - e*
r)

________________________________________________________________________________________

sympy [A]  time = 2.83, size = 151, normalized size = 1.96 \[ a d x + a e r x \log {\relax (x )} - a e r x + a e x \log {\relax (f )} + b d n x \log {\relax (x )} - b d n x + b d x \log {\relax (c )} + b e n r x \log {\relax (x )}^{2} - 2 b e n r x \log {\relax (x )} + 2 b e n r x + b e n x \log {\relax (f )} \log {\relax (x )} - b e n x \log {\relax (f )} + b e r x \log {\relax (c )} \log {\relax (x )} - b e r x \log {\relax (c )} + b e x \log {\relax (c )} \log {\relax (f )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*(d+e*ln(f*x**r)),x)

[Out]

a*d*x + a*e*r*x*log(x) - a*e*r*x + a*e*x*log(f) + b*d*n*x*log(x) - b*d*n*x + b*d*x*log(c) + b*e*n*r*x*log(x)**
2 - 2*b*e*n*r*x*log(x) + 2*b*e*n*r*x + b*e*n*x*log(f)*log(x) - b*e*n*x*log(f) + b*e*r*x*log(c)*log(x) - b*e*r*
x*log(c) + b*e*x*log(c)*log(f)

________________________________________________________________________________________